import { createApp } from "vue";
import App from "./App.vue";

//导入配置的样式变量
import "@/style/index.scss";

//导入全局样式，清除浏览器默认样式
import "normalize.css";

//导入ElementUI库

// import ElmementPlus from "element-plus";

//import "element-plus/dist/index.css";

// 导入路由
import router from "./router/index";

//导入pinia

import { createPinia } from "pinia";

// 导入 pinia-plugin-persistedstate 用来做数据持久化
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

//导入定义在Vue实例上的一些常用方法
import element from "@/plugins/element";

//  导入unocss
import "uno.css";

//导入路由鉴权权限
import "./permission";

const app = createApp(App);
const pinia = createPinia();

pinia.use(piniaPluginPersistedstate); //pinia安装持久化插件

app.use(router); // 挂载路由,这里的路由，会自动挂载到App.vue的 <RouterView>中
app.use(pinia); // 挂载状态库
//app.use(ElmementPlus); //挂载组件库

app.use(element);

app.mount("#app");
